from django.db import models
from  django.contrib.auth.models import AbstractUser
class User(AbstractUser):
    weChat = models.CharField(max_length=30,verbose_name='微信号',help_text='微信号')
    mobile = models.CharField(max_length=11,unique=True,verbose_name='手机号',help_text='手机号')
    email_active = models.BooleanField(default=False,verbose_name='邮件激活状态')
    user_type = models.CharField(max_length=2, default="00", verbose_name="用户类型（00系统用户）")
    email = models.CharField(max_length=50, blank=True, verbose_name="用户邮箱")
    phonenumber = models.CharField(max_length=11, blank=True, verbose_name="手机号码")
    sex = models.CharField(max_length=1, default="0", verbose_name="用户性别（0男 1女 2未知）")
    avatar = models.CharField(max_length=100, blank=True, verbose_name="头像地址")
    del_flag = models.CharField(max_length=1, default="0", verbose_name="删除标志（0代表存在 2代表删除）")
    login_ip = models.CharField(max_length=128, blank=True, verbose_name="最后登录IP")
    login_date = models.DateTimeField(null=True, blank=True, verbose_name="最后登录时间")


    class Meta:

        verbose_name = '用户'
        verbose_name_plural = verbose_name
